load("//bazel:skia_rules.bzl", "generate_cpp_files_for_headers", "skia_filegroup")

package(
    default_applicable_licenses = ["//:license"],
)

licenses(["notice"])

PUBLIC_HEADERS = [
    "GrGLAssembleHelpers.h",
    "GrGLAssembleInterface.h",
    "GrGLBackendSurface.h",
    "GrGLConfig.h",
    "GrGLDirectContext.h",
    "GrGLExtensions.h",
    "GrGLFunctions.h",
    "GrGLInterface.h",
    "GrGLTypes.h",
]

skia_filegroup(
    name = "public_hdrs",
    srcs = PUBLIC_HEADERS,
    visibility = [
        "//src/gpu/ganesh/gl:__pkg__",
    ],
)

WEBGL_HEADERS = [
    "GrGLMakeWebGLInterface.h",
]

skia_filegroup(
    name = "webgl_hdrs",
    srcs = WEBGL_HEADERS,
    visibility = [
        "//src/gpu/ganesh/gl/webgl:__pkg__",
    ],
)

generate_cpp_files_for_headers(
    name = "headers_to_compile",
    headers = PUBLIC_HEADERS + WEBGL_HEADERS,
)
